﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Model
{
    [Serializable]
    public class ProjectDetails{
        private string companyName;
        private string projectName;
        private string projectLocation;
        private string tecUnit;
        private string hazopType;
        private string projectDesc;

        public ProjectDetails(){}
        public ProjectDetails(string companyName, string projectName, string projectLocation, string tecUnit, string hazopType, string projectDesc){
            this.companyName = companyName;
            this.projectName = projectName;
            this.projectLocation = projectLocation;
            this.tecUnit = tecUnit;
            this.hazopType = hazopType;
            this.projectDesc = projectDesc;
        }

        public string CompanyName{
            get { return companyName; }
            set { companyName = value; }
        }

        public string ProjectName{
            get { return projectName; }
            set { projectName = value; }
        }

        public string ProjectLocation{
            get { return projectLocation; }
            set { projectLocation = value; }
        }

        public string TecUnit{
            get { return tecUnit; }
            set { tecUnit = value; }
        }

        public string HazopType{
            get { return hazopType; }
            set { hazopType = value; }
        }

        public string ProjectDesc{
            get { return projectDesc; }
            set { projectDesc = value; }
        }

        public override bool Equals(object obj){
            if (obj != null && obj is ProjectDetails){
                ProjectDetails p = (ProjectDetails) obj;
                if (this.projectName == p.projectName && this.projectLocation == p.projectLocation
                    && this.projectDesc == p.projectDesc && this.companyName == p.companyName && this.tecUnit == p.tecUnit
                    && this.hazopType == p.hazopType)
                    return true;
            }
            return false;
        }
    }
}
